<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<style type="text/css">
	body{overflow:auto;}
  thead tr {background-color: ActiveCaption; color: CaptionText;}
  th, td {vertical-align: top; font-family: "宋体", Arial, Helvetica, sans-serif; font-size: 9pt; padding: 3px; }
  table, td {border: 1px solid silver;}
  table {border-collapse: collapse;}
  thead .col0 {width: 20%;}
  thead .col1 {width: 75%;}
	td.col0{font-size:18px;font-weight:bold;color:#f00;}
</style>
<body class="white-bg">
    <table>
      <thead>
        <tr>
          <th class="col0">章节</th>
          <th class="col1">内容</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td class="col0">第1章 开发环境与工具</td>
          <td class="col1"><p><span style="font-family:宋体;"><span style="font-size: 18px;"><img th:src="@{/assets/javaeeimg/245f4f1df5ff461bb8c2893c3314ae3f.png}" width="400" alt="" /></span></span><span style="font-family:宋体;margin-left: 50px;"><span style="font-size: 18px;"><img th:src="@{/assets/javaeeimg/ce52715b6c944fe7ad8c546ab8c8a227.png}" width="400" alt="" /><br /></span></span></p><p><span style="font-family:宋体;"><span style="font-size: 18px;">安装相关软件、配置开发环境，准备相关能提高开发效率的工具。<br /></span></span></p><p></p><p></p><p><strong style=""><span style="font-family:Microsoft YaHei;font-size:24px;color:#6600cc;">磨刀不误砍柴功</span></strong><span style="font-family: 宋体; font-size: 18px;">！！</span></p><p><br /></p><p><span style="font-family:宋体;"><span style="font-size: 18px;">凡事开头难，所以要做好充足的准备工作。准备充分，将获得“<strong><span style="color:#ff0000;">事半功倍</span></strong>”的效果，否则“<strong><span style="color:#ff0000;">事倍功半</span></strong>”，会浪费大量的时间折腾开发工具和软件调试（排错）。</span></span></p>  </td>
        </tr>
        <tr>
          <td class="col0">1.1 下载资源</td>
          <td class="col1"><p><span style="font-size: 18px; font-family: 宋体; text-indent: 28px;">本书使用的开发工具建议从官方网站下载，如&nbsp;</span><span class="s6" times="" new="" roman="" serif="" style="font-size: 18px; margin: 0px; padding: 0px;">JDK</span><span style="font-size: 18px; font-family: 宋体; text-indent: 28px;">、</span><span class="s6" times="" new="" roman="" serif="" style="font-size: 18px; margin: 0px; padding: 0px;">Tomcat</span><span style="font-size: 18px; font-family: 宋体; text-indent: 28px;">、</span><span class="s6" times="" new="" roman="" serif="" style="font-size: 18px; margin: 0px; padding: 0px;">MySQL</span><span style="font-size: 18px; font-family: 宋体; text-indent: 28px;">、</span><span class="s6" times="" new="" roman="" serif="" style="font-size: 18px; margin: 0px; padding: 0px;">MyEclipse</span><span style="font-size: 18px; font-family: 宋体; text-indent: 28px;">、&nbsp;</span><span class="s6" times="" new="" roman="" serif="" style="font-size: 18px; margin: 0px; padding: 0px;">HeidiSQL</span><span style="font-size: 18px; font-family: 宋体; text-indent: 28px;">，下载链接地址参照附录，推荐优先下载免安装版本（</span><span class="s6" times="" new="" roman="" serif="" style="font-size: 18px; margin: 0px; padding: 0px;">Portable</span><span style="font-size: 18px; font-family: 宋体; text-indent: 28px;">）。</span></p><p style="text-indent: 28px;"><span style="font-family:宋体;"><span style="font-size: 18px;">校园网也提供了下载地址，但需要安装百度网盘，下载的时候，请务必选择正确的版本下载，且不要在当前上课的教室下载。</span></span></p><p style="text-indent: 28px;"><span style="font-family:宋体;"><span style="font-size: 18px;">链接：<a href="https://pan.baidu.com/s/1fMWhFkSRTNbbsqkPBft8Hw" target="_blank">https://pan.baidu.com/s/1fMWhFkSRTNbbsqkPBft8Hw </a>
提取码：2d5z <br /></span></span></p>  </td>
        </tr>
        <tr>
          <td class="col0">1.2 安装JTM</td>
          <td class="col1"><p class="s6" style="margin: 0pt; padding: 0px 0px 0px 26pt; font-family: " times="" new="" roman="" serif=""></p><p><span style="font-size:18px;">JTM<span style="font-family:宋体;">是指</span>JDK + Tomcat + MySQL<span style="font-family:宋体;">集成环境，安装和配置好</span>JTM<span style="font-family:宋体;">，就能搭建出支持</span>JavaEE<span style="font-family:宋体;">项目和</span>MySQL<span style="font-family:宋体;">数据库的服务器运行环境，可用于</span>JavaEE<span style="font-family:宋体;">项目的测试和部署。</span></span></p><p><span style="font-size:18px;"><span style="font-family:宋体;">大部分人愿意选择</span>exe<span style="font-family:宋体;">或</span>msi<span style="font-family:宋体;">的可运行安装版本，这样可以通过安装程序的向导方式，根据提示一步步完成安装，更多的是默认安装，但默认安装的路径可能存在空格或中文，在调试程序时可能遇到因路径问题引起的特殊异常。</span></span></p><p><span style="font-size:18px;"><span style="font-family:宋体;">为了避免遇到安装路径引起的异常，也为了便于管理开发部署的项目，实际上可以选择解压缩版本，将</span>JTM<span style="font-family:宋体;">安装到同一目录，目录的创建要求如下：</span></span></p><p><span style="font-size:18px;">1)<span style="font-family: Times New Roman;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-family:宋体;">目录名尽量短小，但见名知义。</span></span></p><p><span style="font-size:18px;">2)<span style="font-family: Times New Roman;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-family:宋体;">目录名中，尽量使用小写字母或字母与数字的组合，建议不要使用中文或其它符号，尤其不要使用空格。</span></span></p><p><span style="font-size:18px;">3)<span style="font-family: Times New Roman;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-family:宋体;">建议把目录创建在非系统盘中。</span></span></p><p><span style="font-size:18px;"><span style="font-family:宋体;">假定</span>jtm<span style="font-family:宋体;">目录为</span>d:\jtmlrw<span style="font-family:宋体;">，则主要目录结构如图</span>1-1<span style="font-family:宋体;">所示，当然还有其它安装后的文件夹或文件，一般不要删除。</span></span></p><br /><div style="text-align: center;"><img th:src="@{/assets/javaeeimg/Image_001.png}" alt="" style="font-size: 18px;" /></div><div style="text-align: center;"><br /></div><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 5pt; text-indent: 21pt; font-family: 宋体; font-size: 18px; line-height: 15.82px;"></p><p class="s9" style="margin: 0pt; padding: 4pt 0px 0px; font-family: 宋体; font-size: 9pt; text-align: center;">图&nbsp;<span class="p" style="margin: 0pt; padding: 0px; font-family: times new roman serif; font-size: 9pt">1-1 JTM&nbsp;</span>安装后的主要目录结构</p><div><br /></div><br />   </td>
        </tr>
        <tr>
          <td class="col0">1.2.1 安装JDK</td>
          <td class="col1"><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 5pt; text-indent: 21pt; font-family: 宋体; line-height: 28px;"><span style="font-size:18px;">将下载的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">jdk1.8&nbsp;</span>压缩包解压到&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">D:\jtmlrw&nbsp;</span>目录下， 然后设置&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">3&nbsp;</span>个环境变量：</span></p><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 26pt; font-family: 宋体;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">1</span>）<strong>新建</strong>系统变量&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;"><strong><span style="color:#ff0000;">JAVA_HOME</span></strong></span>，设置值为&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;"><strong><span style="color:#ff0000;">D:\jtmlrw\jdk</span></strong></span></span></p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 26pt; font-family: 宋体;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">2</span>）<strong>新建</strong>系统变量&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;"><strong><span style="color:#ff0000;">CLASSPATH</span></strong></span>，设置值为<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;"><span style="color:#ff0000;"><strong>.;D:\jtmlrw\jdk\lib;D:\jtmlrw\jdk\lib\tools.jar</strong></span></span></span></p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 26pt; font-family: 宋体;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">3</span>）在系统环境变量&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;"><span style="color:#cc33cc;"><strong>path&nbsp;</strong></span></span>的开头，<strong>添加</strong>&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;"><span style="color:#ff0000;"><strong>D:\jtmlrw\jdk\bin;D:\jtmlrw\jdk\jre\bin;</strong></span></span></span></p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 26pt; font-family: 宋体;"><span style="font-size:18px;">一定要注意是添加，不要覆盖原来的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">path&nbsp;</span>值。</span></p> </td>
        </tr>
        <tr>
          <td class="col0">1.2.2 安装Tomcat</td>
          <td class="col1"><p class="s5" style="margin: 0pt; padding: 9pt 0px 0px 26pt; font-family: 宋体;"></p><p><span style="font-size:18px;"><span style="font-family:宋体;">将下载的</span>Tomcat8.0<span style="font-family:宋体;">压缩包解压到</span>D:\jtmlrw\<span style="font-family:宋体;">目录下，设置</span>URI<span style="font-family:宋体;">默认字符集为</span>UTF-8<span style="font-family:宋体;">，可以根据需要修改默认的</span>8080<span style="font-family:宋体;">端口。</span></span></p><p><span style="font-size:18px;"><span style="font-family:宋体;">打开配置文件</span>tomcat8\conf\server.xml<span style="font-family:宋体;">，在</span>8080<span style="font-family:宋体;">端口所属的</span>Connector<span style="font-family:宋体;">节点，添加</span>URIEncoding=<span style="color:#880000;background:#F0F0F0;">&quot;UTF-8&quot;</span><span style="font-family:宋体;">，如图</span>1-2<span style="font-family:宋体;">所示，可以解决大部分</span>GET<span style="font-family:宋体;">请求时中文乱码的问题。</span></span></p><p><strong><span style="font-size:18px;"><span style="font-family:宋体;color:red;">★非常重要</span><span style="font-family:宋体;color:red;">★</span></span></strong></p><br /><p style="margin: 0pt; padding: 0px; font-family: " times="" new="" roman="" serif=""><span style="font-size:18px;"><br style="margin: 0px; padding: 0px;" /></span></p><p style="text-align: center; margin: 0pt; padding: 0px 0px 0px 68pt;" times="" new="" roman="" serif="" line-height:="" 10pt="" text-align:="" center=""><span style="margin: 0px; padding: 0px;"><span style="font-size:18px;"><img th:src="@{/assets/javaeeimg/Image_002.png}" style="margin: 0px; padding: 0px;" alt="" /></span></span></p><p class="s9" style="margin: 0pt; padding: 4pt 0px 0px; font-family: 宋体; text-align: center;"><span style="font-size:18px;">图&nbsp;<span class="p" style="margin: 0pt; padding: 0px; font-family: " times="" new="" roman="" serif="">1-2 Tomcat&nbsp;</span>设置&nbsp;<span class="p" style="margin: 0pt; padding: 0px; font-family: " times="" new="" roman="" serif="">URI&nbsp;</span>默认字符集为&nbsp;<span class="p" style="margin: 0pt; padding: 0px; font-family: " times="" new="" roman="" serif="">UTF-8</span></span></p><div><span class="p" style="margin: 0pt; padding: 0px; font-family: times new roman serif; font-size: 9pt"><br /></span></div>    </td>
        </tr>
        <tr>
          <td class="col0">1.2.3 安装MySQL</td>
          <td class="col1"><p class="s5" style="margin: 0pt; padding: 9pt 0px 0px 26pt; font-family: 宋体; line-height: 28px;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif="">1</span>）将下载的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif="">MySQL5.7&nbsp;</span>压缩包解压到&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif="">D:\jtmlrw\</span>目录下，设置环境变量。&nbsp;</span></p><p class="s5" style="margin: 0pt; padding: 9pt 0px 0px 26pt; font-family: 宋体; line-height: 28px;"><span style="font-size:18px;">在系统环境变量&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif=""><strong>path&nbsp;</strong></span>的开头，<strong>添加</strong>&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif=""><strong><span style="color:#ff0000;">D:\jtmlrw\mysql\bin;</span></strong></span></span></p><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 5pt; text-indent: 21pt; font-family: 宋体; line-height: 28px; text-align: justify;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">2</span>）由于&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">5.7.20&nbsp;</span>以上的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">MySQL&nbsp;</span>解压缩版文件夹已没有默认的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">data&nbsp;</span>文件夹和配置文件&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif=""><strong><span style="color:#ff0000;">my.ini</span></strong></span>，所以需要先在&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">D:\jtmlrw\mysql&nbsp;</span>目录下创建&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">my.ini</span>，添加必要的配置项，如下所示。</span></p><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 5pt; text-indent: 21pt; font-family: 宋体; line-height: 28px; text-align: justify;"><span style="font-size:18px;">如果有更多的配置需求，可以查看官网提供的文档。</span></p><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 5pt; text-indent: 21pt; font-family: 宋体; line-height: 28px; text-align: justify;"><span style="font-size:18px;"><br /></span></p><p style="margin: 0pt; padding: 3pt 0px 0px 47pt; font-family: " times="" new="" roman="" serif="" line-height:="" 28px=""><span style="font-size:18px;color:#ff6600;">[client]&nbsp;</span></p><p style="margin: 0pt; padding: 3pt 0px 0px 47pt; font-family: " times="" new="" roman="" serif="" line-height:="" 28px=""><span style="font-size:18px;color:#ff6600;">port=3066</span></p><p style="margin: 0pt; padding: 3pt 0px 0px 47pt; font-family: " times="" new="" roman="" serif="" line-height:="" 28px=""><span style="font-size:18px;color:#ff6600;">[mysql]</span></p><p style="margin: 0pt; padding: 0px 0px 0px 47pt; font-family: " times="" new="" roman="" serif="" line-height:="" 28px=""><span style="font-size:18px;color:#ff6600;">default-character-set=utf8</span></p><p style="margin: 0pt; padding: 0px 0px 0px 47pt; font-family: " times="" new="" roman="" serif="" line-height:="" 28px=""><span style="font-size:18px;color:#ff6600;">[mysqld]</span></p><p style="margin: 0pt; padding: 0px 0px 0px 47pt; font-family: " times="" new="" roman="" serif="" line-height:="" 28px=""><span style="font-size:18px;color:#ff6600;">port=3066</span></p><p style="margin: 0pt; padding: 0px 0px 0px 47pt; font-family: " times="" new="" roman="" serif="" line-height:="" 28px=""><span style="font-size:18px;color:#ff6600;">datadir=D:/jtmlrw/mysql/data</span></p><p style="margin: 0pt; padding: 0px 0px 0px 47pt; font-family: " times="" new="" roman="" serif="" line-height:="" 28px=""><span style="font-size:18px;color:#ff6600;">character-set-server=utf8</span></p><p style="margin: 0pt; padding: 0px 0px 0px 47pt; font-family: " times="" new="" roman="" serif=""><span style="font-size:18px;color:#ff6600;">default-storage-engine=INNODB</span></p><p style="margin: 0pt; padding: 2pt 0px 0px 47pt; font-family: " times="" new="" roman="" serif=""><span style="font-size:18px;color:#ff6600;">sql-mode=&quot;STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION&quot;</span></p><p style="margin: 0pt; padding: 2pt 0px 0px 47pt; font-family: " times="" new="" roman="" serif="" line-height:="" 28px=""><span style="font-size:18px;color:#ff6600;">server-id=1</span></p><p style="margin: 0pt; padding: 2pt 0px 0px 47pt; font-family: " times="" new="" roman="" serif="" line-height:="" 28px=""><span style="font-size:18px;color:#ff6600;">max_connections=151</span></p><p style="margin: 0pt; padding: 2pt 0px 0px 47pt; font-family: " times="" new="" roman="" serif="" line-height:="" 28px=""><span style="font-size:18px;color:#ff6600;">table_open_cache=2000</span></p><p style="margin: 0pt; padding: 2pt 0px 0px 47pt; font-family: " times="" new="" roman="" serif="" line-height:="" 28px=""><span style="font-size:18px;color:#ff6600;">tmp_table_size=16M</span></p><p style="margin: 0pt; padding: 2pt 0px 0px 47pt; font-family: " times="" new="" roman="" serif="" line-height:="" 28px=""><span style="font-size:18px;color:#ff6600;">thread_cache_size=10</span></p><p style="margin: 0pt; padding: 2pt 0px 0px 47pt; font-family: " times="" new="" roman="" serif="" line-height:="" 28px=""><span style="font-size:18px;color:#ff6600;">key_buffer_size=8M</span></p><p style="margin: 0pt; padding: 2pt 0px 0px 47pt; font-family: " times="" new="" roman="" serif="" line-height:="" 28px=""><span style="font-size:18px;color:#ff6600;">read_buffer_size=0</span></p><p style="margin: 0pt; padding: 2pt 0px 0px 47pt; font-family: " times="" new="" roman="" serif="" line-height:="" 28px=""><span style="font-size:18px;color:#ff6600;">read_rnd_buffer_size=0</span></p><p style="margin: 0pt; padding: 2pt 0px 0px 47pt; font-family: " times="" new="" roman="" serif="" line-height:="" 28px=""><span style="font-size:18px;color:#ff6600;">max_allowed_packet=40M</span></p><p style="margin: 0pt; padding: 2pt 0px 0px 47pt; font-family: " times="" new="" roman="" serif="" line-height:="" 28px=""><span style="font-size:18px;color:#ff6600;">sort_buffer_size=256K</span></p><p style="margin: 0pt; padding: 2pt 0px 0px 47pt; font-family: " times="" new="" roman="" serif="" line-height:="" 28px=""><span style="font-size:18px;color:#ff6600;">table_definition_cache=1400</span></p><p style="margin: 0pt; padding: 2pt 0px 0px 47pt; font-family: " times="" new="" roman="" serif="" line-height:="" 28px=""><span style="font-size:18px;color:#ff6600;"><br /></span></p><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 26pt; font-family: 宋体; line-height: 13pt;"><span style="font-size:18px;">生成&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif="">data&nbsp;</span>文件夹及默认的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif="">MySQL&nbsp;</span>数据库，在命令行窗口中运行“<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif=""><strong><span style="color:#ff0000;">mysqld --initialize-insecure&nbsp;&nbsp;</span></strong></span></span><span style="font-size:18px; font-family: " times="" new="" roman="" serif=""><strong><span style="color:#ff0000;">--user=mysql</span></strong></span><span class="s5" style="font-size:18px; margin: 0px; padding: 0px;">”。</span></p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 26pt; font-family: 宋体;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif="">3</span>）将&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif="">MySQL&nbsp;</span>设定为系统服务，随开机启动。启动管理员模式下的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif="">CMD</span>，运行“<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif=""><strong><span style="color:#ff0000;">mysqld -</span></strong></span></span><span style="font-size:18px; font-family: " times="" new="" roman="" serif=""><strong><span style="color:#ff0000;">install MySQL</span></strong></span><span class="s5" style="font-size:18px; margin: 0px; padding: 0px;">”，启动&nbsp;</span><span style="font-size:18px; font-family: " times="" new="" roman="" serif="">MySQL&nbsp;</span><span class="s5" style="font-size:18px; margin: 0px; padding: 0px;">服务：“</span><span style="font-size:18px; font-family: " times="" new="" roman="" serif=""><strong><span style="color:#ff0000;">net start MySQL</span></strong></span><span class="s5" style="font-size:18px; margin: 0px; padding: 0px;">”。</span></p>   </td>
        </tr>
        <tr>
          <td class="col0">1.2.4 安装问题</td>
          <td class="col1"><p class="s5" style="margin: 0pt; padding: 9pt 0px 0px 26pt; font-family: 宋体;"><span style="font-size:18px;">不同的计算机，系统环境有差异，安装过程中可能会遇到一些问题，例如：</span></p><p style="margin: 0pt; padding: 0px; font-family: Times New Roman, serif;"><span style="font-size:18px;"><br style="margin: 0px; padding: 0px;" /></span></p><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 26pt; font-family: 宋体;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">1</span>）安装目录中有空格，或者使用了中文。</span></p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 26pt; font-family: 宋体; line-height: 28px;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">2</span>）端口号冲突。 解决方法（以&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">MySQL&nbsp;</span>为例）：</span></p><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 47pt; text-indent: -21pt; font-family: 宋体; line-height: 28px;"><span style="font-size:18px;"><span class="s11" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Wingdings;">?&nbsp;</span>可用命令“<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">netstat –ano</span>”找到占用端口的进程&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">pid</span>，如图&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">1-3&nbsp;</span>所示，找到占用&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">3066&nbsp;</span>端 口的进程&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">pid&nbsp;</span>为&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">2032</span>。不同时间、不同机器所显示的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">pid&nbsp;</span>不一定相同。</span></p><p style="margin: 0pt; padding: 0px; font-family: Times New Roman, serif;"><span style="font-size:18px;"><br style="margin: 0px; padding: 0px;" /></span></p><p style="margin: 0pt; padding: 0px 0px 0px 62pt; font-family: Times New Roman, serif; line-height: 10pt; text-align: center;"><span style="margin: 0px; padding: 0px;"><span style="font-size:18px;"><img th:src="@{/assets/javaeeimg/Image_003.png}" style="margin: 0px; padding: 0px;" alt="" /></span></span></p><p class="s9" style="margin: 0pt; padding: 4pt 0px 0px 5pt; font-family: 宋体; text-align: center;"><span style="font-size:18px;">图&nbsp;<span class="p" style="margin: 0pt; padding: 0px; font-family: Times New Roman, serif;">1-3&nbsp;</span>用命令查看进程占用的端口列表</span></p><p class="s5" style="margin: 0pt; padding: 7pt 0px 0px 47pt; text-indent: -21pt; font-family: 宋体; line-height: 28px;"><span style="font-size:18px;"><span class="s11" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Wingdings;">?&nbsp;</span>在任务管理器中，根据上一步找到的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">pid&nbsp;</span>确定占用端口的进程，如图&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">1-4&nbsp;</span>所示，可以 看到&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">pid&nbsp;</span>为&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">2032&nbsp;</span>的进程是&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">mysqld.exe</span>。</span></p><p style="margin: 0pt; padding: 0px; font-family: Times New Roman, serif;"><span style="font-size:18px;"><br style="margin: 0px; padding: 0px;" /></span></p><p style="margin: 0pt; padding: 0px 0px 0px 79pt; font-family: Times New Roman, serif; line-height: 10pt; text-align: center;"><span style="margin: 0px; padding: 0px;"><span style="font-size:18px;"><img th:src="@{/assets/javaeeimg/Image_004.png}" style="margin: 0px; padding: 0px;" alt="" /></span></span></p><p class="s9" style="margin: 0pt; padding: 4pt 0px 0px 5pt; font-family: 宋体; text-align: center;"><span style="font-size:18px;">图&nbsp;<span class="p" style="margin: 0pt; padding: 0px; font-family: Times New Roman, serif;">1-4&nbsp;</span>任务管理器中的进程与&nbsp;<span class="p" style="margin: 0pt; padding: 0px; font-family: Times New Roman, serif;">pid</span></span></p><p class="s5" style="margin: 0pt; padding: 7pt 0px 0px 26pt; font-family: 宋体;"><span style="font-size:18px;"><span class="s11" style="margin: 0px; padding: 0px; font-family: Wingdings;">?&nbsp;</span>根据实际情况卸载占用端口的进程所对应的软件，或者更改&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">JTM&nbsp;</span>的端口号。</span></p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 5pt; text-indent: 21pt; font-family: 宋体; line-height: 28px; text-align: justify;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">3</span>）安装&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">mysql 5.7.xx&nbsp;</span>报错，提示信息为：“<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">This application requires Visual Studio 2013 Redistributable. Please install the Redistributable then run this installer again</span>”。</span></p><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 5pt; text-indent: 21pt; font-family: 宋体; line-height: 28px; text-align: justify;"><span style="font-size:18px;">问题原因是&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">MySQL&nbsp;</span>自动安装时所需的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">Visual C++ Redistributable&nbsp;</span>路径不正确，或者&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">x64&nbsp;</span>的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">MySQL&nbsp;</span>识别的也是&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">x86&nbsp;</span>的安装路径，所以解决方案是从微软公司的官方网站上手动下载&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">Visual C++ Redistributable</span>（<a href="http://www.microsoft.com/zh-CN/download/details.aspx?id=40784" class="s12" target="_blank" style="margin: 0px; padding: 0px; text-indent: 0px; color: black; font-family: Times New Roman, serif; text-decoration-line: none;">https://</a><span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">www.microsoft.com/zh-CN/download/details.aspx?id=40784</span>）</span><span style="font-size:18px;">安装，将&nbsp;</span><span class="s6" style="font-size:18px; margin: 0px; padding: 0px; font-family: Times New Roman, serif;">vcredist_x64&nbsp;</span><span style="font-size:18px;">和&nbsp;</span><span class="s6" style="font-size:18px; margin: 0px; padding: 0px; font-family: Times New Roman, serif;">vcredist_86&nbsp;</span><span style="font-size:18px;">都下载下来，先安装&nbsp;</span><span class="s6" style="font-size:18px; margin: 0px; padding: 0px; font-family: Times New Roman, serif;">vcredist_x64&nbsp;</span><span style="font-size:18px;">后尝试重新安装&nbsp;</span><span class="s6" style="font-size:18px; margin: 0px; padding: 0px; font-family: Times New Roman, serif;">mysql 5.7.xx</span><span style="font-size:18px;">。如果依然报错，则安装&nbsp;</span><span class="s6" style="font-size:18px; margin: 0px; padding: 0px; font-family: Times New Roman, serif;">vcredist_x86&nbsp;</span><span style="font-size:18px;">后再次安装&nbsp;</span><span class="s6" style="font-size:18px; margin: 0px; padding: 0px; font-family: Times New Roman, serif;">MySQL&nbsp;</span><span style="font-size:18px;">解决问题。</span></p> </td>
        </tr>
        <tr>
          <td class="col0">1.3 安装MyEclipse</td>
          <td class="col1"><span style="font-size:18px;">无论采用哪种编码、调试工具，如MyEclipse、IntelliJ IDEA，都要熟练掌握其常用功能的使用。</span></td>
        </tr>
        <tr>
          <td class="col0">1.3.1 安装</td>
          <td class="col1"><span style="font-size:18px;"><span style="font-family: 宋体; text-align: justify; text-indent: 28px;">从官网上下载&nbsp;</span><span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; text-align: justify;">myeclipse-2015-stable-3.0&nbsp;</span><span style="font-family: 宋体; text-align: justify; text-indent: 28px;">运行安装，安装路径（如&nbsp;</span><span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; text-align: justify;">D:\MyEclipse2015</span><span style="font-family: 宋体; text-align: justify; text-indent: 28px;">）和 工作空间&nbsp;</span><span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; text-align: justify;">workspace</span><span style="font-family: 宋体; text-align: justify; text-indent: 28px;">（如&nbsp;</span><span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; text-align: justify;">F:\myjavaee</span><span style="font-family: 宋体; text-align: justify; text-indent: 28px;">）尽量选择（或创建）一级目录，<strong>目录名尽量短小，使用 英文或数字</strong>。</span></span><br /> </td>
        </tr>
        <tr>
          <td class="col0">1.3.2 常规设置</td>
          <td class="col1"><p class="s5" style="margin: 0pt; padding: 9pt 0px 0px 5pt; text-indent: 21pt; font-family: 宋体; line-height: 28px; text-align: justify;"><span style="font-size:18px;">使用&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">MyEclipse&nbsp;</span>开发调试项目前，需要进行参数设置。运行&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">MyEclipse</span>，单击&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">Windows&nbsp;</span>菜 单中的菜单项&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">Preferences</span>（首选项），打开参数设置对话框，以下参数的设置均在&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">Preferences&nbsp;</span>对话框中进行。</span></p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 26pt; font-family: 宋体;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">1</span>）单击&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">General&nbsp;</span>中的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">Workspace</span>，如图&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">1-5&nbsp;</span>所示，设置&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">MyEclipse&nbsp;</span>工作空间中项目文件</span><span style="font-size:18px;">（</span><span class="s6" style="font-size:18px; margin: 0px; padding: 0px; font-family: Times New Roman, serif;">*.java</span><span style="font-size:18px;">、</span><span class="s6" style="font-size:18px; margin: 0px; padding: 0px; font-family: Times New Roman, serif;">*.js</span><span style="font-size:18px;">、</span><span class="s6" style="font-size:18px; margin: 0px; padding: 0px; font-family: Times New Roman, serif;">*.css</span><span style="font-size:18px;">、</span><span class="s6" style="font-size:18px; margin: 0px; padding: 0px; font-family: Times New Roman, serif;">*.json&nbsp;</span><span style="font-size:18px;">等）的统一编码方式（</span><span class="s6" style="font-size:18px; margin: 0px; padding: 0px; font-family: Times New Roman, serif;">Encoding</span><span style="font-size:18px;">）为&nbsp;</span><span class="s6" style="font-size:18px; margin: 0px; padding: 0px; font-family: Times New Roman, serif;">UTF-8</span><span style="font-size:18px;">。</span><span style="font-size:18px; margin: 0px; padding: 0px;"><strong><span style="color:#ff0000;">★非常重要★</span></strong></span></p><p style="margin: 0pt; padding: 0px; font-family: Times New Roman, serif;"><span style="font-size:18px;"><br style="margin: 0px; padding: 0px;" /></span></p><p style="margin: 0pt; padding: 0px 0px 0px 66pt; font-family: Times New Roman, serif; line-height: 10pt; text-align: center;"><span style="margin: 0px; padding: 0px;"><span style="font-size:18px;"><img th:src="@{/assets/javaeeimg/Image_005.png}" style="margin: 0px; padding: 0px;" alt="" /></span></span></p><p class="s9" style="margin: 0pt; padding: 4pt 0px 0px 5pt; font-family: 宋体; text-align: center;"><span style="font-size:18px;">图&nbsp;<span class="p" style="margin: 0pt; padding: 0px; font-family: Times New Roman, serif;">1-5&nbsp;</span>设置项目文件编码方式</span></p><p class="s5" style="margin: 0pt; padding: 7pt 0px 0px 5pt; text-indent: 21pt; font-family: 宋体; line-height: 28px; text-align: justify;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">2</span>）单击“<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">+</span>”号，展开&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">General&nbsp;</span>和&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">Appearance</span>，选择&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">Colors and Fonts</span>，字号设置稍大一 点，如“<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">14</span>”。</span></p><p class="s6" style="margin: 0pt; padding: 0px 0px 0px 5pt; text-indent: 21pt; font-family: Times New Roman, serif; line-height: 28px; text-align: justify;"><span style="font-size:18px;"><span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">（</span>3<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">）选择&nbsp;</span>General&nbsp;<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">中的&nbsp;</span>Web Browser<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">，选用系统默认的外部浏览器，通常选择便于调试的 极速模式浏览器，例如&nbsp;</span>360&nbsp;<a href="http://chrome.360.cn/" target="_blank" style="margin: 0px; padding: 0px; text-indent: 0px; color: black; font-family: 宋体; text-decoration-line: none;">极速浏览器（</a><a href="http://chrome.360.cn/" class="s12" target="_blank" style="margin: 0px; padding: 0px; text-indent: 0px; color: black; text-decoration-line: none;">http://chrome.360.cn</a>/<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">），如图&nbsp;</span>1-6&nbsp;<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">所示。</span></span></p><p style="margin: 0pt; padding: 0px; font-family: Times New Roman, serif;"><span style="font-size:18px;"><br style="margin: 0px; padding: 0px;" /></span></p><p style="margin: 0pt; padding: 0px; font-family: Times New Roman, serif;"><span style="font-size:18px;"><br style="margin: 0px; padding: 0px;" /></span></p><p style="margin: 0pt; padding: 0px; font-family: Times New Roman, serif; text-align: center;"><span style="margin: 0px; padding: 0px;"><span style="font-size:18px;"><img th:src="@{/assets/javaeeimg/Image_006.png}" style="margin: 0px; padding: 0px;" alt="" /></span></span></p><p class="s13" style="margin: 0pt; padding: 0px 0px 0px 261pt; color: rgb(255, 255, 255); font-family: 宋体;"><span style="font-size:18px;">极速模式标记</span></p><p style="margin: 0pt; padding: 0px; font-family: Times New Roman, serif;"><span style="font-size:18px;"><br style="margin: 0px; padding: 0px;" /></span></p><p class="s9" style="margin: 0pt; padding: 2pt 0px 0px 5pt; font-family: 宋体; text-align: center;"><span style="font-size:18px;">图&nbsp;<span class="p" style="margin: 0pt; padding: 0px; font-family: Times New Roman, serif;">1-6&nbsp;</span>设置浏览器为极速模式</span></p><p class="s5" style="margin: 0pt; padding: 7pt 0px 0px 26pt; font-family: 宋体;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">4</span>）选择&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">Java&nbsp;</span>中的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">Installed JREs</span>，添加已安装的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">jdk</span>，如&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">jdk1.8</span>。</span></p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 26pt; font-family: 宋体;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">5</span>）展开&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">MyEclipse&nbsp;</span>中的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">Files and Editors</span>，设置各类文件的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">Encoding&nbsp;</span>为&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">UTF-8</span></span></p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 5pt; text-indent: 21pt; font-family: 宋体; line-height: 28px;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">6</span>）也可以搜索需要设置的项，如搜索“<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">server</span>”，选择&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">Runtime Environments</span>，设置调 试服务器，如图&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">1-7&nbsp;</span>所示，设置&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">runtime&nbsp;</span>为已安装的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">Tomcat8</span>，<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">JRE&nbsp;</span>为已安装的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">jdk</span>。</span></p><p style="margin: 0pt; padding: 0px; font-family: Times New Roman, serif;"><span style="font-size:18px;"><br style="margin: 0px; padding: 0px;" /></span></p><p style="margin: 0pt; padding: 0px 0px 0px 56pt; font-family: Times New Roman, serif; line-height: 10pt; text-align: center;"><span style="margin: 0px; padding: 0px;"><span style="font-size:18px;"><img th:src="@{/assets/javaeeimg/Image_007.png}" style="margin: 0px; padding: 0px;" alt="" /></span></span></p><p class="s9" style="margin: 0pt; padding: 4pt 0px 0px 47pt; font-family: 宋体; text-align: center;"><span style="font-size:18px;">图&nbsp;<span class="p" style="margin: 0pt; padding: 0px; font-family: Times New Roman, serif;">1-7&nbsp;</span>设置调试服务器</span></p><p style="margin: 0pt; padding: 0px; font-family: Times New Roman, serif;"><span style="font-size:18px;"><br style="margin: 0px; padding: 0px;" /></span></p><p style="margin: 0pt; padding: 0px; font-family: Times New Roman, serif;"><span style="font-size:18px;"><br style="margin: 0px; padding: 0px;" /></span></p><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 5pt; text-indent: 21pt; font-family: 宋体; line-height: 28px;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">7</span>）选择&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">MyEclipse&nbsp;</span>中的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">maven4myeclipse</span>，为了避免长时间联网更新，只勾选&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">Offline</span>、&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">Do not automatically update</span>，将&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">mavenjdk&nbsp;</span>改为&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">JTM&nbsp;</span>中的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">jdk</span>。如果要创建&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">Maven&nbsp;</span>项目，不能这 样选择。</span></p> </td>
        </tr>
        <tr>
          <td class="col0">1.3.3 常用快捷键</td>
          <td class="col1"><p class="s5" style="margin: 0pt; padding: 9pt 0px 0px 26pt; font-family: 宋体;"></p><p><span style="font-size:18px;"><span style="font-family:宋体;">为了提高编码、调试效率，需要掌握一些快捷键的使用，如表</span>1-1<span style="font-family:宋体;">所示。</span></span></p><p><span style="font-size:18px;">&nbsp;</span></p><p><span style="font-size:18px;"><span style="font-family:黑体;">表</span>1.1 MyEclipse<span style="font-family:黑体;">中常用快捷键</span></span></p><table border="1" cellspacing="0" cellpadding="0" width="533"> <tbody><tr><td style="width:88.45pt;"><p><span style="font-family:黑体;"><span style="font-size:18px;">快捷键</span></span></p></td><td style="width:311.6pt;"><p><span style="font-size:18px;"><span style="font-family:黑体;">作</span>&nbsp; <span style="font-family:黑体;">用</span></span></p></td></tr><tr><td style="width:88.45pt;"><p><span style="font-size:18px;">Ctrl+Shift+F</span></p></td><td style="width:311.6pt;"><p><span style="font-family:宋体;"><span style="font-size:18px;">格式化代码，规范选中的代码格式</span></span></p></td></tr><tr><td style="width:88.45pt;"><p><span style="font-size:18px;">Ctrl+Shift+O</span></p></td><td style="width:311.6pt;"><p><span style="font-size:18px;"><span style="font-family:宋体;">在</span>java<span style="font-family:宋体;">类文件中使用，自动引入</span>( <strong><span style="color:#7F0055;">import </span></strong>)<span style="font-family:宋体;">需要的</span>java<span style="font-family:宋体;">包或清理不需要的</span>java<span style="font-family:宋体;">包。</span></span></p></td></tr><tr><td style="width:88.45pt;"><p><span style="font-size:18px;">Ctrl+Shift+/</span></p></td><td style="width:311.6pt;"><p><span style="font-size:18px;"><span style="font-family:宋体;">自动识别代码类型，为选中的内容添加相应的注释，如在</span>html<span style="font-family:宋体;">代码中添加</span> <span style="color:#3F5FBF;">&lt;!--&nbsp; --&gt; </span><span style="font-family:宋体;">，在</span>Java<span style="font-family:宋体;">或者</span>JavaScript<span style="font-family:宋体;">代码中添加</span><span style="color:#3F7F5F;">/* */</span></span></p></td></tr><tr><td style="width:88.45pt;"><p><span style="font-size:18px;">Ctrl+Shift+\</span></p></td><td style="width:311.6pt;"><p><span style="font-family:宋体;"><span style="font-size:18px;">取消相应的注释</span></span></p></td></tr><tr><td style="width:88.45pt;"><p><span style="font-size:18px;">Alt+/</span></p></td><td style="width:311.6pt;"><p><span style="font-family:宋体;"><span style="font-size:18px;">代码提示、自动补全</span></span></p></td></tr><tr><td style="width:88.45pt;"><p><span style="font-size:18px;">Ctrl+M</span></p></td><td style="width:311.6pt;"><p><span style="font-family:宋体;"><span style="font-size:18px;">窗口最大化和还原</span></span></p></td></tr><tr><td style="width:88.45pt;"><p><span style="font-size:18px;">Ctrl+D</span></p></td><td style="width:311.6pt;"><p><span style="font-family:宋体;"><span style="font-size:18px;">删除一行</span></span></p></td></tr><tr><td style="width:88.45pt;"><p><span style="font-size:18px;">Ctrl+O</span></p></td><td style="width:311.6pt;"><p><span style="font-family:宋体;"><span style="font-size:18px;">显示类中方法和属性的大纲</span></span></p></td></tr></tbody></table><br /></td>
        </tr>
        <tr>
          <td class="col0">1.3.4 常见问题</td>
          <td class="col1"><p class="s5" style="margin: 0pt; padding: 9pt 0px 0px 5pt; text-indent: 21pt; font-family: 宋体; line-height: 28px;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">1</span>）项目名称上出现<strong><span style="color:#ff0000;">红色感叹号</span></strong>，说明项目的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">jar&nbsp;</span>包引入的有问题（可能是工程中&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">java build path&nbsp;</span>中指向的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">jar&nbsp;</span>包路径错误，或者引入了非&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">jar&nbsp;</span>包文件），需要重新引入&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">jar&nbsp;</span>包。</span></p><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 5pt; text-indent: 21pt; font-family: 宋体; line-height: 28px;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">2</span>）多个文件名前显示<span style="color:#ff0000;"><strong>红叉</strong></span>，但文件来源于官方，内容应该没问题，这是&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">MyEclipse&nbsp;</span>校 验报错。可以关闭&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">MyElipse&nbsp;</span>的校验。单击&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">Window</span>→<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">Preferences</span>，选择&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">MyEclipse</span>→<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">Validation</span></span></p><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 5pt; font-family: 宋体;"><span style="font-size:18px;">→选中&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif="">Disable ALL</span>，单击&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif="">Apply</span>，然后再单击&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: " times="" new="" roman="" serif="">OK</span>。</span></p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 5pt; text-indent: 21pt; font-family: 宋体; line-height: 28px; text-align: justify;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">3</span>）项目名称上出现<strong><span style="color:#ff0000;">红叉</span></strong>，可能是复制了其他项目，但&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">JDK&nbsp;</span>或者&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">Runtime&nbsp;</span>配置不一致， 导致默认引用的&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: " times="" new="" roman="" serif="">jar&nbsp;</span>路径异常。</span></p>  </td>
        </tr>
        <tr>
          <td class="col0">1.4 常用辅助工具</td>
          <td class="col1">000</td>
        </tr>
        <tr>
          <td class="col0">1.4.1 HeidiSQL</td>
          <td class="col1"><p class="s6" style="margin: 0pt; padding: 0px 0px 0px 5pt; text-indent: 21pt; font-family: Times New Roman, serif; line-height: 28px; text-align: justify;"><span style="font-size:18px;">HeidiSQL&nbsp;<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">是一款用于简化&nbsp;</span>MySQL&nbsp;<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">服务器和数据库管理的免费开源的图形化界面。&nbsp;</span>HeidiSQL&nbsp;<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">软件允许浏览数据库、管理表、浏览和编辑记录、管理用户权限、从文本文件导入 数据、运行&nbsp;</span>SQL&nbsp;<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">查询、在两个数据库之间同步表以及导出选择的表到其他数据库或者&nbsp;</span>SQL&nbsp;<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">脚 本当中。</span>HeidiSQL&nbsp;<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">提供了一个用于在数据库之间切换&nbsp;</span>SQL&nbsp;<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">查询和标签带有语法突出显示的简 单易用的界面，其他功能包括&nbsp;</span>BLOB&nbsp;<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">和&nbsp;</span>MEMO&nbsp;<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">编辑、大型&nbsp;</span>SQL&nbsp;<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">脚本支持、用户进程管理等。</span></span></p><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 26pt; font-family: 宋体;"><span style="font-size:18px;">通过&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">HeidiSQL&nbsp;</span>工具管理&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">MySQL&nbsp;</span>数据库、创建表、编辑数据、设置字符集为&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">UTF8</span>。</span></p><p class="s10" style="margin: 0pt; padding: 1pt 0px 0px 5pt; font-family: 宋体; font-weight: bold;"><span style="font-size:18px;color:#ff0000;">★非常重要★</span></p> </td>
        </tr>
        <tr>
          <td class="col0">1.4.2 Notpad++</td>
          <td class="col1"><p class="s6" style="margin: 0pt; padding: 0px 0px 0px 5pt; text-indent: 21pt; font-family: Times New Roman, serif; line-height: 28px; text-align: justify;"><span style="font-size:18px;">Notepad++<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">程序员必备的文本编辑器，软件小巧高效，支持&nbsp;</span>27&nbsp;<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">种编程语言，如&nbsp;</span>C<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">、</span>C++<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">、&nbsp;</span>Java<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">、</span>C#<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">、</span>XML<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">、</span>HTML<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">、</span>PHP<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">、</span>JS&nbsp;<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">等，可完美地取代微软的记事本。配置&nbsp;</span>Notepad++<span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体;">到右键 菜单，便于文档内容的编辑、批量查找替换。</span></span></p><div><span class="s5" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: 宋体; font-size: 18px;"><br /></span></div> </td>
        </tr>
        <tr>
          <td class="col0">1.4.3 MagicalTool</td>
          <td class="col1"><span style="font-size:18px;"><span style="font-family: Times New Roman, serif; text-align: justify; text-indent: 28px;">MagicalTool&nbsp;</span><span class="s5" style="margin: 0px; padding: 0px; font-family: 宋体; text-align: justify;">代码自动生成工具，支持模板，可以直接生成&nbsp;</span><span style="font-family: Times New Roman, serif; text-align: justify; text-indent: 28px;">dao</span><span class="s5" style="margin: 0px; padding: 0px; font-family: 宋体; text-align: justify;">、</span><span style="font-family: Times New Roman, serif; text-align: justify; text-indent: 28px;">controller&nbsp;</span><span class="s5" style="margin: 0px; padding: 0px; font-family: 宋体; text-align: justify;">和&nbsp;</span><span style="font-family: Times New Roman, serif; text-align: justify; text-indent: 28px;">service&nbsp;</span><span class="s5" style="margin: 0px; padding: 0px; font-family: 宋体; text-align: justify;">等； 瞬间完成项目表的增删查改；把数据库的表或视图直接快速生成符合特定&nbsp;</span><span style="font-family: Times New Roman, serif; text-align: justify; text-indent: 28px;">java&nbsp;</span><span class="s5" style="margin: 0px; padding: 0px; font-family: 宋体; text-align: justify;">框架技术所需 的&nbsp;</span><span style="font-family: Times New Roman, serif; text-align: justify; text-indent: 28px;">POJO&nbsp;</span><span class="s5" style="margin: 0px; padding: 0px; font-family: 宋体; text-align: justify;">类。</span></span><br /> </td>
        </tr>
        <tr>
          <td class="col0">1.5 考核任务</td>
          <td class="col1"><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 26pt; font-family: 宋体; line-height: 15.82px;"><span style="font-size:18px;">本章主要考核开发工具的准备、环境的配置、工具的安装。 开发环境检查考核明细：</span></p><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 26pt; font-family: 宋体;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">1</span>）能正常打开&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">MyEclipse</span>。（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">20&nbsp;</span>分）</span></p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 26pt; font-family: 宋体;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">2</span>）<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">JDK&nbsp;</span>和&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">Tomcat&nbsp;</span>都在同一目录下，安装目录符合要求。（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">20&nbsp;</span>分）</span></p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 26pt; font-family: 宋体;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">3</span>）在命令窗口，输入&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">java –version&nbsp;</span>后按回车键，可以看到&nbsp;<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">Java&nbsp;</span>的版本信息。（<span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif;">20&nbsp;</span>分）</span></p><p class="s5" style="margin: 0pt; padding: 1pt 0px 0px 5pt; text-indent: 21pt; font-family: 宋体; line-height: 28px; text-align: justify;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">4</span>）运行&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">tomcat\bin\startup.bat&nbsp;</span>文件，在弹出的命令窗口中可以看到最后一行显示&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">Server startup in xxxxx ms</span>。（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">20&nbsp;</span>分）</span></p><p class="s5" style="margin: 0pt; padding: 0px 0px 0px 5pt; text-indent: 21pt; font-family: 宋体; line-height: 28px; text-align: justify;"><span style="font-size:18px;">（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">5</span>）运行&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">HeidiSQL</span>，配置&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">IP</span>（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">127.0.0.1</span>）、用户名（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">root</span>）、密码，可看到系统中的默认 数据库，比如&nbsp;<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">MySQL</span>。（<span class="s6" style="margin: 0px; padding: 0px; text-indent: 0px; font-family: Times New Roman, serif;">20&nbsp;</span>分）</span></p> </td>
        </tr>
        <tr>
          <td class="col0">本章小结</td>
          <td class="col1"><span style="font-size:18px;"><span style="font-family: 宋体; text-align: justify; text-indent: 28px;">本章主要介绍开发&nbsp;</span><span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; text-align: justify;">JavaEE&nbsp;</span><span style="font-family: 宋体; text-align: justify; text-indent: 28px;">项目需要的工具并进行下载与安装，对相关环境变量、工具参 数的配置。只有当开发环境和工具都安装配置完善，才能进行&nbsp;</span><span class="s6" style="margin: 0px; padding: 0px; font-family: Times New Roman, serif; text-align: justify;">JavaEE&nbsp;</span><span style="font-family: 宋体; text-align: justify; text-indent: 28px;">项目的快速开发，也就 是“磨刀不误砍柴功”。</span></span><br /> </td>
        </tr>




		</tbody>
    </table>
<div th:include="include :: footer"></div>
</body>
</html>
